package com.bc.bcmodel.resp;

import java.math.BigDecimal;
import java.util.Date;

public class WalletTokenResp {

    private static final int DEFAULTSCALE = 8;
    private static final int DEFAULTUSDTSCALE = 2;

    public String getContract() {
        return contract;
    }

    public void setContract(String contract) {
        this.contract = contract;
    }

    private String contract;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getSymbol() {
        return symbol;
    }

    public void setSymbol(String symbol) {
        this.symbol = symbol;
    }

    public BigDecimal getAmount() {
        return amount.setScale(DEFAULTSCALE, BigDecimal.ROUND_DOWN);
    }

    public void setAmount(BigDecimal amount) {
        this.amount = amount;
    }

    public BigDecimal getUsdtvalue() {
        usdtvalue = getAmount().multiply(getRate()).setScale(DEFAULTUSDTSCALE, BigDecimal.ROUND_DOWN);
        return usdtvalue;
    }

    public BigDecimal getRate() {
        if (rate == null) {
            return BigDecimal.ZERO;
        }
        return rate;
    }

    public void setRate(BigDecimal rate) {
        this.rate = rate;
    }

    private BigDecimal rate;

    private String name;

    private String symbol;

    private BigDecimal amount;

    private BigDecimal usdtvalue;

    public Date getModify_time() {
        return modify_time;
    }

    public void setModify_time(Date modify_time) {
        this.modify_time = modify_time;
    }

    private Date modify_time;

}
